package demo.spring.restful.domain;

public final class Computer {
	private long id;
    
    private String name;
     
    private String color;
     
    private double screen;
 
    public Computer(){
        id=0;
    }
     
    public Computer(long id, String name, String color, double screen){
        this.id = id;
        this.name = name;
        this.color = color;
        this.screen = screen;
    }
     
    public long getId() {
        return id;
    }
 
    public void setId(long id) {
        this.id = id;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public String color() {
        return color;
    }
 
    public void setColor(String color) {
        this.color = color;
    }
 
    public double getScreen() {
        return screen;
    }
 
    public void setScreen(double screen) {
        this.screen = screen;
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int) (id ^ (id >>> 32));
        return result;
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Computer other = (Computer) obj;
        if (id != other.id)
            return false;
        return true;
    }
 
    @Override
    public String toString() {
        return "Computer [id=" + id + ", name=" + name + ", color=" + color
                + ", screen=" + screen + "]";
    }
 

}
